The SimpleMenu Component > FSimpleMenu (object)

 

FSimpleMenu (object)

The methods of the SimpleMenu component allow you to control all aspects of the component at runtime. You can create SimpleMenus; edit, add, and remove navigation items and separator bars; set or override basic parameters; and set additional runtime options. You don't need to use a constructor to access the methods of components.

You can use the FSimpleMenu methods to specify a handler function for push buttons, disable or enable buttons, and resize buttons without distortion at runtime.

Component methods do not perform error checking for type, as do other native ActionScript objects and actions. Therefore, you should validate parameters before passing them to methods.

 
Method summary for the FSimpleMenu object

Method name

Description

FSimpleMenu.addItem(label)

Adds either a button or a separator bar to the end of the SimpleMenu component.

FSimpleMenu.addItemAt(index, label)

Adds either a button or a separator bar at the specified index on the SimpleMenu component.

FSimpleMenu.getAxis()

Retrieves the axis of the SimpleMenu.

FSimpleMenu.getButtonWidth()

Gets the width of all the buttons.

FSimpleMenu.getClickHandler()

Retrieves an object with the Click Handler function's name and a reference to the obj in which the Click Handler function resides.

FSimpleMenu.getEnabled()

Retrieves the enabled state of the SimpleMenu component.

FSimpleMenu.getItemAt(index)

Retrieves an object containing the label and itemType properties of an item on the SimpleMenu component at the specified index.

FSimpleMenu.getLength()

Retrieves the number of items on the SimpleMenu component.

FSimpleMenu.getPadding()

Retrieves the pixel number between each item on the Simple Menu component.

FSimpleMenu.registerSkinElement(element, styleProperty)

Registers a skin element to a style property. Skin elements are registered to properties in the first frame of the Read Me layer of each skin in the library.

FSimpleMenu.removeAll()

Removes all items on the SimpleMenu component.

FSimpleMenu.removeItemAt(index)

Removes an item on the SimpleMenu component at the specified index.

FSimpleMenu.replaceItemAt(index, label)

Replaces the item at the specified index on the SimpleMenu with a new button or separator bar.

FSimpleMenu.setAxis(axis)

Modifies the build of the component from either left-right or top-bottom. The axis parameter must have a string value of either "horizontal", "vertical", or a Boolean value of true (for the default "horizontal" axis).

FSimpleMenu.setButtonWidth(width)

Sets the width of all the buttons on the SimpleMenu component.

FSimpleMenu.setClickHandler(handler, obj)

Sets the handler for when an item on the SimpleMenu is clicked. The handler is passed a reference to the SimpleMenu as well as the index of the item clicked.

FSimpleMenu.setDataProvider(dataProvider)

Specifies the data provider from which to create items on the SimpleMenu.

FSimpleMenu.setEnabled(enabled)

Enables or disables the SimpleMenu. In the disabled state, the loading box accepts no keyboard or mouse input.

FSimpleMenu.setPadding(padding)

Specifies the number of pixels (an integer) in between each item on the SimpleMenu.

FSimpleMenu.setStyleProperty(property, value)

Sets an FStyleFormat property for an individual SimpleMenu instance.